/**
 * Created by yunpeng on 2015/4/16.
 */
/**
 * Created by yunpeng on 2015/4/13.
 */
$('#advicedg').datagrid({
    url:'/admin/adviceList',
    //border : false,
    rownumbers: true,
    idField : 'id',
    pagination : true,
    sortName : 'createtime',//默认排序的列
    sortOrder: 'desc',
    pageSize : 10,
    pageList : [ 10, 20, 40, 80 ],
    fitColumns : true,
    fit : true,
    checkOnSelect : false,
    selectOnCheck : true,
    striped: true,//条纹交替
    columns:[[
        {field:'',checkbox:true},
        {field:'phone',title:'用户手机',width:100,align:'center'},
        {field:'content',title:'内容',width:550,align:'center'},
        {field:'createtime',title:'发布日期',width:100,align:'center'}
    ]],
    toolbar : '#advicetb'
});

function searchAdviceList(){
    $('#advicedg').datagrid('load',{
        date1: $('#odate1').datebox('getValue'),
        date2: $('#odate2').datebox('getValue'),
        phone: $('#ophone').textbox('getValue')
    });
}


